package businesslogicservice.teacherservice;

import java.util.ArrayList;
import java.util.HashMap;

import vo.CourseSelectionVO;
import vo.LessonVO;
import vo.Message;
import businesslogic.coursebl.CourseController;
import businesslogic.courseselectionbl.ScoreService;
import businesslogicservice.courseblservice.CourseBLService;
import businesslogicservice.courseselectionblservice.CourseSelectionBLService;

public class TeacherController implements TeacherService {
	CourseBLService courseBL = new CourseController();
	CourseSelectionBLService courseSelectionBL = new ScoreService();

	@Override
	public Message modifyLesson(LessonVO vo) {
		Message message = courseBL.modifyLesson(vo);
		return message;
	}

	@Override
	public ArrayList<LessonVO> findLesson(String teacherId) {
		ArrayList<LessonVO> list = courseBL.findLesson(teacherId);
		return list;
	}

	@Override
	public ArrayList<CourseSelectionVO> getCourseScoreList(String lessonID,
			String term) {
		ArrayList<CourseSelectionVO> list = courseSelectionBL
				.getCourseScoreList(lessonID, term);
		return list;
	}

	@Override
	public boolean recordScore(HashMap<String, Double> map) {
		boolean result = courseSelectionBL.recordScore(map);
		return result;
	}

}
